<?php

namespace App\Module\Api\Controllers;
use App\Module\Api\Validator\CategoryListValidator;
use App\System\Base\Repositories\BaseRegionRepository;

/**
 * 分类列表
 * @package App\Module\Admin\Controllers
 */
class RegionListController extends Controller
{
    //主页
    public function index()
    {
        (new CategoryListValidator())->check();

        $action = $this->query->action;
        $user = BaseRegionRepository::getInstance();
        if($action == 1)
        {//省市区列表
            $data = $user->getList($this->table);
        }

        return apiResponse($data);
    }

}
